import { createRouter,createWebHistory } from "vue-router"; 
import LoginVue from '@/views/Login.vue'
import LayoutVue from '@/views/Layout.vue'
import ArticleCategoryVue from "@/views/article/ArticleCategory.vue";
import ArticleManageVue from "@/views/article/ArticleManage.vue";
import UserAvatarVue from "@/views/user/UserAvatar.vue";
import UserInfo from "@/views/user/UserInfo.vue";
import UserResetPassword from "@/views/user/UserResetPassword.vue";


const routes=[
    {path:'/login',component:LoginVue},
    {path:'/',component:LayoutVue,redirect :'/article/manage', children: [
        {path:'/article/category',component:ArticleCategoryVue},
        {path:'/article/manage',component:ArticleManageVue}, 
        {path:'/user/avatar',component:UserAvatarVue},
        {path:'/user/info',component:UserInfo},
        {path:'/user/resetPassword',component:UserResetPassword}
    ]}
]
//创建路由器

const router=createRouter({
    history:createWebHistory(),
    routes:routes
})

//导出
export default router

